Alan Mackenzie [Fri, 14 Jan 2022 19:28:07 +0000 (19:28 +0000)]
Merge branch 'master' into scratch/correct-warning-pos
Merge branch:
commit
d29291d665e808307126bf52c3e748fef78f0f9c (HEAD -> master,
origin/master, origin/HEAD)
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Date: Fri Jan 14 12:26:30 2022 -0500
(macroexp--expand-all): Fix bug#53227 and bug#46636
Alan Mackenzie [Fri, 14 Jan 2022 19:06:04 +0000 (19:06 +0000)]
Commit fixes and enhancements to the scratch/correct-warning-pos branch
No longer strip positions from symbols before each use of a form, instead
relying on the low level C routines to do the right thing. Instead strip them
from miscellaneous places where this is needed. Stip them alson in
`function-put'.
Push forms onto byte-compile-form-stack and pop them "by hand" rather than by
binding the variable at each pushing, so that it will still have its data
after an error has been thrown and caught by a condition case. This gives an
source position to the ensuing error message.
* lisp/emacs-lisp/byte-run.el (byte-run--ssp-seen, byte-run--circular-list-p)
(byte-run--strip-s-p-1, byte-run-strip-symbol-positions): New functions and
variables, which together implement stripping of symbol positions. The latest
(?final) version modifies the argument in place rather than making a copy.
(function-put): Strip symbol positions from all of the arguments before doing
the `put'.
* lisp/emacs-lisp/bytecomp.el (byte-compile--form-stack): has been renamed to
byte-compile-form-stack and moved to macroexp.el.
(byte-compile-initial-macro-environment (eval-and-compile)): Replace
macroexpand-all-toplevel with macroexpand--all-toplevel.
(displaying-byte-compile-warnings): bind byte-compile-form-stack here.
(byte-compile-toplevel-file-form, byte-compile-form): Push the top level form
onto byte-compile-form-stack (whereas formally the variable was bound at each
pushing). Manually pop this from of the variable at the end of the function.
* lisp/emacs-lisp/cl-macs.el (cl-define-compiler-macro): Remove the symbol
stripping.
* lisp/emacs-lisp/comp.el (comp--native-compile): Set max-specpdl-size to at
least 5000 (previously it was 2500). Bind print-symbols-bare to t.
* lisp/emacs-lisp/macroexp.el (byte-compile-form-stack): Definition move here
from bytecomp.el for easier compilation.
(byte-compile-strip-symbol-positions and associated functions): Removed.
(macro--expand-all): push argument FORM onto byte-compile-form-stack at the
start of this function, and pop it off at the end.
(internal-macroexpand-for-load): No longer strip symbol positions. Bind
symbols-with-pos-enabled and print-symbols-bare to t.
* lisp/help.el (help--make-usage): Strip any position from argument ARG.
* src/fns.c (Fput): No longer strip symbol positions from any of the
arguments.
Stefan Monnier [Fri, 14 Jan 2022 17:26:30 +0000 (12:26 -0500)]
(macroexp--expand-all): Fix bug#53227 and bug#46636
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Don't mis-expand
invalid funcalls.
Stefan Kangas [Fri, 14 Jan 2022 15:17:33 +0000 (16:17 +0100)]
image-dired: Use MD5 for thumb filename generation
* lisp/image-dired.el (image-dired-thumb-name): Revert back to MD5 for
file name generation to preserve backwards-compatibility. (Bug#53229)
Po Lu [Fri, 14 Jan 2022 11:47:35 +0000 (19:47 +0800)]
* src/xterm.c: Add a small writeup on input handling on X.
Hopefully I will extend this section with details about more
aspects of X11 support in the future.
Lars Ingebrigtsen [Fri, 14 Jan 2022 11:12:47 +0000 (12:12 +0100)]
Regenerate ldefs-boot.el
Lars Ingebrigtsen [Fri, 14 Jan 2022 11:10:46 +0000 (12:10 +0100)]
Skip ffap test on some systems
Lars Ingebrigtsen [Fri, 14 Jan 2022 10:51:24 +0000 (11:51 +0100)]
Make function-alias-p use a better error symbol
* lisp/subr.el (function-alias-p): Use the same error symbol as
`indirect-function'.
Lars Ingebrigtsen [Fri, 14 Jan 2022 09:29:43 +0000 (10:29 +0100)]
Don't have ffap interpret ":/bin" as the current directory
* lisp/ffap.el (ffap-file-at-point): Don't interpret :/bin as the
current directory (bug#52441).
Lars Ingebrigtsen [Fri, 14 Jan 2022 09:03:15 +0000 (10:03 +0100)]
Add a `shortdoc' convenience alias
* lisp/emacs-lisp/shortdoc.el (shortdoc): Add a convenience alias
(bug#52968).
Po Lu [Fri, 14 Jan 2022 09:46:50 +0000 (09:46 +0000)]
Fix leak when refs are sent to a frame during destruction on Haiku
* src/haikuterm.c (haiku_read_socket): Free b->ref if it was
sent from a frame that was destroyed.
Po Lu [Fri, 14 Jan 2022 09:43:09 +0000 (17:43 +0800)]
Make sure the X mouse position hook always looks at an X frame
* src/xterm.c (XTmouse_position): Check that f1 is an X frame.
Robert Pluim [Thu, 13 Jan 2022 14:54:28 +0000 (15:54 +0100)]
spelling-tests.el: use ert-with-temp-directory
* test/lisp/so-long-tests/spelling-tests.el (so-long-spelling): Use
;ert-with-temp-directory' instead of passing :directory to
'ert-with-temp-file', and restore the prefix/suffix values used
originally with 'make-temp-file'.
Robert Pluim [Thu, 13 Jan 2022 09:57:56 +0000 (10:57 +0100)]
spelling-tests.el: ignore errors when checking for ispell
ispell-valid-dictionary-list can signal an error, eg when the local
hunspell installation cannot find any dictionaries, so it's best to
ignore that error.
* test/lisp/so-long-tests/spelling-tests.el (so-long-spelling): Wrap
ispell check in ignore-errors, as ispell-valid-dictionary-list can
signal an error.
Lars Ingebrigtsen [Fri, 14 Jan 2022 08:49:44 +0000 (09:49 +0100)]
Add new context menu functions to the context-menu-functions type
* lisp/mouse.el (context-menu-functions): Add new menu functions
to the defcustom type list (bug#52973).
Philip Kaludercic [Fri, 31 Dec 2021 14:21:13 +0000 (15:21 +0100)]
Add command to invoke a search engine
* mouse.el (context-menu-online-search): Add new function
(eww-search-prefix): Declare variable from eww.el
(mouse-online-search-at-point): Add new command
Philip Kaludercic [Fri, 31 Dec 2021 11:45:52 +0000 (12:45 +0100)]
Implement context-menu-mode support for hi-lock
* hi-lock.el (hi-lock-symbol-at-mouse): Add new command
(hi-lock-context-menu): Add new function
Philip Kaludercic [Fri, 31 Dec 2021 11:37:50 +0000 (12:37 +0100)]
Implement context-menu-mode support for man pages
* man.el (Man-at-mouse): Add new command
(Man-context-menu): Add new function
Juri Linkov [Fri, 14 Jan 2022 08:32:36 +0000 (10:32 +0200)]
Fix @item in the Emacs manual
* doc/emacs/maintaining.texi (Identifier Search): Replace @itemx with @item.
* doc/emacs/search.texi (Special Isearch): Remove @item.
Lars Ingebrigtsen [Fri, 14 Jan 2022 08:25:32 +0000 (09:25 +0100)]
Fix mailcap setup when no mailcap files exist
* lisp/net/mailcap.el (mailcap-parse-mailcaps): Ensure that we
populate mailcap--computed-mime-data even if none of the files
exist (bug#53009).
Lucien Cartier-Tilet [Fri, 14 Jan 2022 08:17:25 +0000 (09:17 +0100)]
(battery-status-function) Fix errors in Termux
* lisp/battery.el (battery-status-function): In Termux, neither
/sys/ or /proc/ are readable on phones that are not rooted. This
patch makes Emacs verify if they are readable before it attemps
reading them (bug#53026).
Copyright-paperwork-exempt: yes
Robert Pluim [Fri, 14 Jan 2022 08:03:53 +0000 (09:03 +0100)]
Improve some nntp/nnimap error messages
* lisp/gnus/nntp.el (nntp-send-string):
(nntp-wait-for):
(nntp-accept-process-output):
(nntp-possibly-change-group):
* lisp/gnus/nnimap.el (nnimap-retrieve-headers): Improve error
messages (bug#53070).
Juri Linkov [Fri, 14 Jan 2022 08:18:43 +0000 (10:18 +0200)]
* lisp/progmodes/xref.el (xref-query-replace-in-results): Fix prefix-arg.
Use current-prefix-arg.
Juri Linkov [Fri, 14 Jan 2022 08:17:37 +0000 (10:17 +0200)]
* doc/emacs/search.texi (Special Isearch): Put related items together.
Move isearch-char-by-name closer to isearch-emoji-by-name.
Eli Zaretskii [Fri, 14 Jan 2022 08:01:39 +0000 (10:01 +0200)]
Update docs of 'xref-query-replace-in-results'
* doc/emacs/maintaining.texi (Identifier Search): Update the
documentation of 'xref-query-replace-in-results'.
Sergey Vinokurov [Fri, 14 Jan 2022 07:49:11 +0000 (08:49 +0100)]
Use assq_no_quit on all local_var_alist accesses
* src/data.c (Fkill_local_variable):
* src/buffer.c (buffer_local_value): Use assq_no_quit instead of
Fassoc/Fassq on local_var_alist (bug#53242).
* src/data.c (Flocal_variable_p): Use assq_no_quit instead of
open-coding the search on local_var_alist.
Eli Zaretskii [Fri, 14 Jan 2022 07:41:24 +0000 (09:41 +0200)]
Improve documentation of 'xref-find-references-and-replace'
* etc/NEWS: Clarify the 'xref-find-references-and-replace' entry.
* doc/emacs/maintaining.texi (Identifier Search): Document
'xref-find-references-and-replace'.
Miha Rihtaršič [Fri, 14 Jan 2022 07:33:58 +0000 (08:33 +0100)]
Fix python-eldoc affecting unrelated comint processes
* lisp/progmodes/python.el (python-shell-send-string-no-output): Don't
let-bind comint-preoutput-filter-functions globally for all comint
processes. Modify the behaviour of only the current python
process (bug#53219).
Eli Zaretskii [Fri, 14 Jan 2022 07:26:20 +0000 (09:26 +0200)]
; * INSTALL (Alternative window systems): Improve wording.
Robert Pluim [Fri, 14 Jan 2022 07:25:07 +0000 (08:25 +0100)]
Improve function-alias-p documentation
* doc/lispref/functions.texi (Defining Functions): Improve the text.
Po Lu [Fri, 14 Jan 2022 06:57:55 +0000 (14:57 +0800)]
Try to make sure an XKB desc is always available
* src/xterm.c (handle_one_xevent): Re-retrieve XKB map if it's
unavailable for some reason upon handling an XKB map or keyboard
notify event.
Lars Ingebrigtsen [Fri, 14 Jan 2022 06:10:26 +0000 (07:10 +0100)]
Fix byte-compilation warning in pcvs-info
* lisp/vc/pcvs-info.el (cvs-mode-toggle-mark): Fix
byte-compilation warning.
Stefan Kangas [Fri, 14 Jan 2022 05:30:23 +0000 (06:30 +0100)]
Merge from origin/emacs-28
34ca4ff9a5 Fix Edebug specification for inline functions (Bug#53068).
3c06c37a8b Remove mention of removed `gnus-treat-play-sounds' variabl...
Po Lu [Fri, 14 Jan 2022 04:34:18 +0000 (12:34 +0800)]
* INSTALL: Document using Emacs on alternative window systems.
Dmitry Gutov [Fri, 14 Jan 2022 02:45:39 +0000 (04:45 +0200)]
; Tweak the NEWS entry
Dmitry Gutov [Fri, 14 Jan 2022 02:38:39 +0000 (04:38 +0200)]
xref-find-references-and-replace: New command
* lisp/progmodes/xref.el (xref-find-references-and-replace):
New command.
Dmitry Gutov [Fri, 14 Jan 2022 02:30:16 +0000 (04:30 +0200)]
Steamline xref-query-replace-in-results
* lisp/progmodes/xref.el (xref-query-replace-in-results):
Steamline the most common scenario
(https://lists.gnu.org/archive/html/emacs-devel/2022-01/msg00864.html).
Po Lu [Fri, 14 Jan 2022 01:24:34 +0000 (01:24 +0000)]
Fix out of bounds bitmap access on Haiku
* src/haiku_draw_support.cc (BView_DrawBitmapWithEraseOp): Fix
out of bounds access to bitmap data.
Po Lu [Fri, 14 Jan 2022 00:52:53 +0000 (08:52 +0800)]
Refresh keyboard mapping upon receiving new XKB map
* src/xterm.c (handle_one_xevent): Call
XkbRefreshKeyboardMapping where required.
Stefan Kangas [Thu, 13 Jan 2022 22:16:16 +0000 (23:16 +0100)]
Prefer defvar-keymap to easy-mmode-defmap
* lisp/progmodes/gud.el (gud-minibuffer-local-map):
* lisp/vc/pcvs-info.el (cvs-status-map): Use defvar-keymap.
* lisp/emacs-lisp/easy-mmode.el (easy-mmode-defmap): Document as
deprecated.
Sam Steingold [Thu, 13 Jan 2022 17:13:30 +0000 (12:13 -0500)]
; tweak doc
Eli Zaretskii [Thu, 13 Jan 2022 14:40:28 +0000 (16:40 +0200)]
Improve documentation of 'isearch-emoji-by-name'
* lisp/isearch.el (isearch-menu-bar-map, isearch-emoji-by-name):
Fix wording of documentation.
* etc/NEWS: Fix wording of the 'isearch-emoji-by-name' entry.
* doc/emacs/search.texi (Special Isearch): Fix wording of the
documentation of 'isearch-emoji-by-name'; move it out of the
enumeration that deals with non-ASCII characters in general.
Eli Zaretskii [Thu, 13 Jan 2022 14:18:50 +0000 (16:18 +0200)]
Fix frame-undeletion menu items
* lisp/menu-bar.el (menu-bar-file-menu): Fix wording of the new
menu items and their help-echo. Don't show "Undelete Frame"
in the menu unless there is a frame to undelete.
Eli Zaretskii [Thu, 13 Jan 2022 13:40:30 +0000 (15:40 +0200)]
Avoid scrolling display when point moves into invisible text
* src/xdisp.c (try_cursor_movement): Handle point moving into
invisible text. (Bug#53215)
Michael Albinus [Thu, 13 Jan 2022 13:09:44 +0000 (14:09 +0100)]
* doc/lispref/functions.texi (Defining Functions): Fix thinko.
Philipp Stephani [Thu, 13 Jan 2022 11:55:06 +0000 (12:55 +0100)]
Fix Edebug specification for inline functions (Bug#53068).
* lisp/emacs-lisp/inline.el (inline-quote): Fix Edebug specification.
* test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-inline): New unit
test.
Eli Zaretskii [Thu, 13 Jan 2022 12:21:10 +0000 (14:21 +0200)]
Improve preserving X coordinate during scroll commands
* src/window.c (window_scroll_pixel_based): Don't unnecessarily
move the iterator. (Bug#53220)
Stefan Kangas [Thu, 13 Jan 2022 12:00:25 +0000 (13:00 +0100)]
* lisp/jsonrpc.el (Version): Bump to 1.0.15.
Po Lu [Thu, 13 Jan 2022 11:42:14 +0000 (19:42 +0800)]
Fix passive input focus when the pointer moves over inferiors
* src/xterm.c (handle_one_xevent): Don't detect focus on entry
and exit events if we're not on the top window.
Mattias Engdegård [Thu, 13 Jan 2022 10:27:21 +0000 (11:27 +0100)]
; * test/lisp/progmodes/flymake-tests.el: remove duplicate function
Robert Pluim [Thu, 13 Jan 2022 09:33:13 +0000 (10:33 +0100)]
spelling-tests.el: actually create a temp directory
This test was creating a file, but actually needs a directory, and
fails otherwise.
* test/lisp/so-long-tests/spelling-tests.el (so-long-spelling):
Pass the :directory arg to ert-with-temp-file so we actually
create a directory.
Po Lu [Thu, 13 Jan 2022 09:56:55 +0000 (17:56 +0800)]
Filter key release events through GTK when using native input
* src/gtkutil.c (xg_filter_key): Set correct event type for key
release events.
* src/xterm.c (x_filter_event): Also filter release events.
Lars Ingebrigtsen [Thu, 13 Jan 2022 08:48:15 +0000 (09:48 +0100)]
Make ert explainers work on function aliases
* lisp/emacs-lisp/ert.el: New function.
(ert--expand-should-1): Use it (bug#53178).
Lars Ingebrigtsen [Thu, 13 Jan 2022 08:42:36 +0000 (09:42 +0100)]
Avoid infloops in help-fns--analyze-function with aliases
* lisp/help-fns.el (help-fns--analyze-function): Use
function-alias-p to avoid infloops.
Lars Ingebrigtsen [Thu, 13 Jan 2022 08:38:47 +0000 (09:38 +0100)]
Add new function function-alias-p
* doc/lispref/functions.texi (Defining Functions): Document it.
* lisp/subr.el (function-alias-p): New function (bug#53178).
Gregory Heytings [Thu, 13 Jan 2022 08:31:43 +0000 (10:31 +0200)]
Undelete deleted frames.
* lisp/frame.el (undelete-frame): New command.
(undelete-frame--handle-delete-frame): New auxiliary function.
(undelete-frame--deleted-frames): New auxiliary variables.
(undelete-frame-mode): New minor mode.
(ctl-x-5-map): Bind the new command.
* etc/NEWS: Document the new command and minor mode.
* src/frame.c (Fdelete_frame): Update docstring, and mention the
minor mode.
* lisp/menu-bar.el (menu-bar-file-menu): Add an entry for the
new command.
* doc/emacs/frames.tex (Frame Commands): Document the new command
and minor mode.
See bug#51883.
N. Jackson [Thu, 13 Jan 2022 07:10:47 +0000 (08:10 +0100)]
Remove mention of removed `gnus-treat-play-sounds' variable from manual
* info/gnus.info: Remove `gnus-treat-play-sounds' from
manual. According to lisp/gnus/ChangeLog.3 this variable was
removed in 2010 (bug#53192).
Po Lu [Thu, 13 Jan 2022 02:10:41 +0000 (10:10 +0800)]
Fix GTK native input methods randomly freezing input
* src/gtkutil.c (xg_widget_key_press_event_cb): Exercise the X11
connection causing pselect to return immediately from input.
(bug#53160)
Po Lu [Thu, 13 Jan 2022 01:59:23 +0000 (01:59 +0000)]
Block input when drawing fringe bitmaps on Haiku
* src/haikuterm.c (haiku_draw_fringe_bitmap): Block input.
Po Lu [Thu, 13 Jan 2022 01:32:14 +0000 (09:32 +0800)]
Use XI2 focus events on X toolkit builds
* src/xfns.c (setup_xi_event_mask): Set focus masks on both the
shell window and the frame window.
* src/xterm.c (x_detect_focus_change): Enable XI2 focus code on
Xt.
Stefan Kangas [Thu, 13 Jan 2022 00:01:48 +0000 (01:01 +0100)]
* lisp/jsonrpc.el (jsonrpc--debug): Use apply on format args list.
Eric Abrahamsen [Wed, 12 Jan 2022 22:58:46 +0000 (14:58 -0800)]
Rework setting/unsetting of gnus-registry-enabled
The basic idea is, we're moving the setting/unsetting of
`gnus-registry-enabled' so that it is a more reliable indicator of
whether the registry is actually available or not.
* lisp/gnus/gnus-registry.el (gnus-registry-load): Move the setting of
`gnus-registry-enabled' here, after we're sure the registry actually
has been loaded.
(gnus-registry-initialize): Move it out of here. All this function
does is conditionally call `gnus-registry-load'.
(gnus-registry-register-message-ids): Only check
`gnus-registry-enabled', since we'd more confident about this
now. Sort checks in order of increasing complexity.
(gnus-registry-clear): Unset `gnus-registry-enabled'.
(gnus-registry-install-hooks): This function should only install
hooks, not set variables.
(gnus-registry-unload-hook): Change the unload hook to call
`gnus-registry-clear', as that will do all the necessary
work (including calling `gnus-registry-unload-hook')
Stefan Monnier [Wed, 12 Jan 2022 20:57:29 +0000 (15:57 -0500)]
Merge remote-tracking branch 'origin/emacs-28' into trunk
Mattias Engdegård [Wed, 12 Jan 2022 18:47:39 +0000 (19:47 +0100)]
Revert "Fix closure-conversion of shadowed captured lambda-lifted vars"
This reverts commit
3ec8c8b3ae2359ceb8135b672e86526969c16b7e.
It was committed to a stable branch without prior discussion;
see bug#53071.
Juri Linkov [Wed, 12 Jan 2022 19:08:16 +0000 (21:08 +0200)]
* lisp/subr.el (remove-hook): Use set-variable-value-history for value history
Juri Linkov [Wed, 12 Jan 2022 18:59:21 +0000 (20:59 +0200)]
* doc/lispref/windows.texi (Textual Scrolling): Remove obsolete text.
Remove text about scrolling the minibuffer from the buffer,
obsolete since Emacs 27 (bug#51210).
Glenn Morris [Wed, 12 Jan 2022 18:36:05 +0000 (10:36 -0800)]
* lisp/files.el (lock-file-name-transforms): Doc tweaks.
Glenn Morris [Wed, 12 Jan 2022 18:23:31 +0000 (10:23 -0800)]
; Fix typo loose/lose
Juri Linkov [Wed, 12 Jan 2022 17:47:32 +0000 (19:47 +0200)]
* lisp/leim/quail/emoji.el: New file (bug#52605).
Daniel Martín [Wed, 12 Jan 2022 17:43:15 +0000 (19:43 +0200)]
Add isearch-emoji-by-name
* lisp/isearch.el (isearch-emoji-by-name): Add a new command to insert
Emoji characters into incremental search strings. (Bug#52605)
(isearch-mode-map): Bind it to 'C-x 8 e RET'.
(isearch-menu-bar-map): Add it to the menu bar.
* doc/emacs/search.texi (Special Isearch): Update the documentation to
mention the new command.
* etc/NEWS: And advertise it.
Glenn Morris [Wed, 12 Jan 2022 17:37:39 +0000 (09:37 -0800)]
Prefer unexport in Makefiles
* admin/grammars/Makefile.in, leim/Makefile.in:
* lisp/Makefile.in, test/Makefile.in:
Use unexport for EMACSLOADPATH.
Glenn Morris [Wed, 12 Jan 2022 17:35:43 +0000 (09:35 -0800)]
Avoid user environment interfering with bootstrap
* Makefile.in, admin/unidata/Makefile.in:
* doc/misc/Makefile.in, lib-src/Makefile.in:
Don't export user environment variables that can affect running
emacs. (Bug#53038)
Mattias Engdegård [Mon, 22 Nov 2021 15:56:38 +0000 (16:56 +0100)]
Fix closure-conversion of shadowed captured lambda-lifted vars
Lambda-lifted variables (ones passed explicitly to lambda-lifted
functions) that are also captured in an outer closure and shadowed
were renamed incorrectly (bug#51982).
Reported by Paul Pogonyshev.
* lisp/emacs-lisp/cconv.el (cconv--lifted-arg): New.
(cconv-convert): Provide correct definiens for the closed-over
variable.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
* test/lisp/emacs-lisp/cconv-tests.el (cconv-tests--intern-all)
(cconv-closure-convert-remap-var): Add tests.
(cherry picked from commit
45252ad8f932c98a373ef0ab7f3363a3e27ccbe4)
Jim Porter [Tue, 4 Jan 2022 20:58:38 +0000 (12:58 -0800)]
Follow POSIX/GNU argument conventions for 'eshell-eval-using-options'
* lisp/eshell/esh-opt.el (eshell--split-switch): New function.
(eshell-set-option): Allow setting a supplied value instead of always
consuming from 'eshell--args'.
(eshell--process-option): Support consuming option values specified as
a single token.
(eshell--process-args): For short options, pass full switch token to
'eshell--process-option'.
* test/lisp/eshell/esh-opt-tests.el (esh-opt-process-args-test): Fix
test.
(test-eshell-eval-using-options): Add tests for various types of
options.
* doc/misc/eshell.texi (Defining new built-in commands): New
subsection, describe how to use 'eshell-eval-using-options'.
* etc/NEWS: Announce the change.
Eli Zaretskii [Wed, 12 Jan 2022 14:52:14 +0000 (16:52 +0200)]
Avoid assertion violations with variable-weight fonts
* src/font.c (font_score, font_delete_unmatched): Don't assume
weight, slant, and width properties of the font must be fixnums:
some variable-weight fonts violate that assumption. Reported
by Sean Whitton <spwhitton@spwhitton.name>. This is for builds
with Fontconfig < v2.11.91, for which the fix in
'ftfont_pattern_entity' cannot work. (Bug#52888)
Sean Whitton [Wed, 5 Jan 2022 02:07:29 +0000 (19:07 -0700)]
Skip virtual FcPattern entries for variable weight fonts
* src/ftfont.c (ftfont_list): Pass FC_VARIABLE to FcObjectSetBuild.
* src/ftfont.c (ftfont_pattern_entity): Skip meta/virtual FcPattern
entries for variable weight fonts (Bug#52888).
Eli Zaretskii [Wed, 12 Jan 2022 12:36:56 +0000 (14:36 +0200)]
; * doc/lispref/modes.texi (Auto Major Mode): Clarification. (Bug#53199)
Po Lu [Wed, 12 Jan 2022 12:13:28 +0000 (20:13 +0800)]
Use correct coordinates when translating XI2 crossing events
* src/xwidget.c (xwidget_motion_or_crossing): Use displaced
position instead of event position.
Po Lu [Wed, 12 Jan 2022 11:09:38 +0000 (11:09 +0000)]
Ignore scroll lock key on Haiku
* src/haiku_support.cc (keysym_from_raw_char): Return special
value for keys that shouldn't be sent to Emacs.
(DispatchMessage): Respect said value.
Philipp Stephani [Tue, 28 Dec 2021 20:05:23 +0000 (21:05 +0100)]
Fix test lisp/cedet/semantic/bovine/gcc-tests on macOS (Bug#52431)
* test/lisp/cedet/semantic/bovine/gcc-tests.el
(semantic-gcc-test-output-parser-this-machine): Also detect Apple
clang on macOS Monterey.
(cherry picked from commit
6e52becfbe2a33c025b8c4838b3c8f06ba5a6fb8)
Mattias Engdegård [Sun, 2 Jan 2022 12:00:13 +0000 (13:00 +0100)]
Don't fail flymake-tests if `gcc` actually is Clang
* test/lisp/progmodes/flymake-tests.el (flymake-tests--gcc-is-clang)
(different-diagnostic-types, included-c-header-files): Skip tests that
depend on the `gcc` command really being GCC and not Clang.
(cherry picked from commit
b2167d98432a78442522b7564e22f47d75a98b6f)
Po Lu [Wed, 12 Jan 2022 07:20:29 +0000 (07:20 +0000)]
Translate more keys on Haiku
* src/haiku_support.cc (keysym_from_raw_char): Translate print,
scroll lock, and pause/break.
Lars Ingebrigtsen [Wed, 12 Jan 2022 05:28:19 +0000 (06:28 +0100)]
Don't do Gnus article emphasis in text/html parts
* lisp/gnus/gnus-art.el (gnus-treat-emphasize): Don't do emphasis
in text/html parts, because this leads to mis-filled text
(especially with *...* that's boldified, which typically becomes
much wider).
Po Lu [Wed, 12 Jan 2022 03:25:15 +0000 (11:25 +0800)]
Fix arity error when trying to add a file to an automake project
* lisp/cedet/ede/project-am.el (project-add-file): Add ignored
_FILE parameter like the other `project-add-file' methods.
Po Lu [Wed, 12 Jan 2022 03:09:52 +0000 (11:09 +0800)]
Fix display of text decorations in the mode line
This is considered a temporary fix until the cause of
fringe-overwriting underlines is established.
* src/xterm.c (x_draw_glyph_string): Don't constrain decorations
if the row is a tab or modeline.
Po Lu [Wed, 12 Jan 2022 02:24:01 +0000 (10:24 +0800)]
Avoid unnecessary lookup of min and max keycodes when XKB is present
* src/xterm.c (x_emacs_to_x_modifiers): Avoid calling
XDisplayKeycodes when that information is available in the xkb
desc and is not needed anyway.
Po Lu [Wed, 12 Jan 2022 01:28:48 +0000 (09:28 +0800)]
Ignore resetting devices upon some events we don't have to handle
* src/xterm.c (handle_one_xevent): Ignore SlaveSwitch
DeviceChanged events.
Alan Mackenzie [Tue, 11 Jan 2022 21:57:54 +0000 (21:57 +0000)]
Merge branch 'master' into scratch/correct-warning-pos
Alan Mackenzie [Tue, 11 Jan 2022 18:29:07 +0000 (18:29 +0000)]
Remove the filename argument from the command line after an ELC+ELN build
This fixes bug #53164. Without this fix, bootstrap-emacs loads the source
file uselessly into a buffer after completing the compilation.
Juri Linkov [Tue, 11 Jan 2022 18:04:30 +0000 (20:04 +0200)]
* lisp/window.el (display-comint-buffer-action): Move to the end of file.
Move closer to pop-to-buffer-same-window after its default value
display-buffer--same-window-action is defined.
Juri Linkov [Tue, 11 Jan 2022 17:34:54 +0000 (19:34 +0200)]
* lisp/vc/vc.el (vc-shrink-buffer-window): New function (bug#51062).
(vc-diff-finish-functions): New variable.
(vc-diff-finish): Use it.
(vc-log-finish-functions): New variable.
(vc-log-internal-common): Use it.
Juri Linkov [Tue, 11 Jan 2022 17:28:52 +0000 (19:28 +0200)]
* src/window.c (other-window-scroll-default): New variable (bug#51210).
(Fother_window_for_scrolling): Use it.
Juri Linkov [Tue, 11 Jan 2022 17:19:37 +0000 (19:19 +0200)]
More fixes for display-comint-buffer-action
* lisp/window.el (display-comint-buffer-action):
Use display-buffer--same-window-action as the default value.
* lisp/progmodes/sh-script.el (sh-show-shell):
* lisp/shell.el (shell): Add display-comint-buffer-action to pop-to-buffer.
* lisp/progmodes/project.el (project-shell, project-eshell): Use
`bound-and-true-p display-comint-buffer-action' for backward-compatibility.
https://lists.gnu.org/archive/html/emacs-devel/2021-12/msg02964.html
Morgan Smith [Tue, 11 Jan 2022 17:13:04 +0000 (19:13 +0200)]
Fix display-comint-buffer-action default behavior (closes bug#52878)
* lisp/window.el (display-comint-buffer-action): Make it an alist.
Paul Eggert [Tue, 11 Jan 2022 16:58:18 +0000 (08:58 -0800)]
Clean up filelock code related to errno
Reduce dependency on Haiku internals, by not assuming that
Haiku errno values (which are negative) are neither -1 nor -2.
This removes an #ifdef HAIKU while still maintaining
portability to Haiku.
* src/filelock.c (NEGATIVE_ERRNO, ANOTHER_OWNS_IT, I_OWN_IT):
New constants, which should work regardless of whether
we are on Haiku or B_USE_POSITIVE_POSIX_ERRORS is defined.
(current_lock_owner, lock_if_free, lock_file, unlock_file)
(Ffile_locked_p): Use them, without assuming anything about errno
value sign.
Paul Eggert [Tue, 11 Jan 2022 16:50:53 +0000 (08:50 -0800)]
Fix userlock diagnostic
* lisp/userlock.el (ask-user-about-lock):
Fix typo (missing paren) in diagnostic.
Eli Zaretskii [Tue, 11 Jan 2022 15:17:05 +0000 (17:17 +0200)]
; * doc/emacs/haiku.texi (Haiku Basics): Fix typo and wording.
Po Lu [Tue, 11 Jan 2022 11:06:41 +0000 (19:06 +0800)]
Stop ungrabbing when freeing XI devices
This breaks when x_free_xi_devices is called from a
HierarchyChange event where a master device has been removed or
a slave device has been detached, and it should no longer be
required since we now rely on passive grabs.
* src/xterm.c (x_init_master_valuators): Stop calling
XIUngrabDevice on all devices.
Po Lu [Tue, 11 Jan 2022 10:13:04 +0000 (18:13 +0800)]
Make native input work on GTK 2
* src/gtkutil.c (xg_create_frame_widgets): Allow focusing fixed
widget.
Po Lu [Tue, 11 Jan 2022 10:06:37 +0000 (18:06 +0800)]
Stop decoding GTK event strings when using native input
* src/gtkutil.c (xg_widget_key_press_event_cb): Stop decoding
event strings.